/*
 * @Author: 李石
 * @Date: 2024-05-29 07:57:22
 * @LastEditors: lishi
 * @LastEditTime: 2024-07-18 15:33:36
 * @Description: 
 * Copyright (c) 2024 by ${lishi0105@163.com}, All Rights Reserved. 
 */
#ifndef TESTFACEAPI_TESTFACEAPI_TIME_UTIL_H
#define TESTFACEAPI_TESTFACEAPI_TIME_UTIL_H
#include <stdio.h>

#include <fstream>
#include <iostream>
#include <iterator>
#include <regex>
#include <sstream>
#include <string>
#include <thread>
// 时间类
class TimeUtil {
public:
    // 获取时间戳
    static uint64_t GetMillTimestamp();
    static uint64_t GetMicroTimestamp();
    static uint64_t GetSecondTimestamp();
    static std::string CurrentDatetime(
        const std::string &format = "%Y-%m-%d %H:%M:%S");
    static std::string MillTsToTimeString(const unsigned long long usec, bool is_24hour = true);
    static uint64_t TimeStringToMilliseconds(const std::string &format);
    static bool ifDayChanged();
    static uint64_t get_start_of_day_timestamp(uint32_t days_ago);
};
#endif
